<?php
$url = SystemProperties::$app_url."?i=".$_SESSION['xn_user_id'].'&tk='.rand(1,10000);
?>

<div>
<img src="<?=SystemProperties::$path?>/image/new/invite_top.gif" width="800" />
</div>
<script type="text/javascript">
function copy(inElement) {
  if (inElement.createTextRange) {
    var range = inElement.createTextRange();
    if (range)
      range.execCommand('Copy');
  } else {
    var flashcopier = 'flashcopier';
    if(!document.getElementById(flashcopier)) {
      var divholder = document.createElement('div');
      divholder.id = flashcopier;
      document.body.appendChild(divholder);
    }
    document.getElementById(flashcopier).innerHTML = '';
    var divinfo = '<embed src="<?=SystemProperties::$path?>/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(inElement.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
    document.getElementById(flashcopier).innerHTML = divinfo;
  }
}
function sendIv(id) {
    ajaxLoad('iv_ct_callback', '/user/sendInviteMessage?iv_ct='+encodeURIComponent($('iv_ct').value) );
}
</script>

    
<div class="iv_page">

<?php if (SystemProperties::$platform=='renren') { ?>
<div>
<iframe height="530" src="/webroot/invite_iframe.php?uid=<?=$_SESSION['xn_user_id']?>" frameBorder="0" width="780" allowTransparency="true" scrolling="no" smartsize="false"></iframe>
</div>
<?php } else { ?>
<div class="iv_title" style="margin-top:30px">
邀请一：邀请微博好友
</div>
  
<textarea name="iv_ct" id="iv_ct"style="width:480px;height:60px;border:1px solid #b2b2b2">
推荐你一个好玩的东东，一般人我不告诉他。
上面有多多的国内国际一线品牌时尚新品，大家可免费获取。
点击本链接即刻加入 <?=$url?> #开心赚宝#
</textarea>
<div style="width:480px;text-align:right">
<span id="iv_ct_callback"> </span><input type="button" style="border:1px solid #b2b2b2" onclick="sendIv()" value="　发布　" />
</div>


<div class="iv_title" >
邀请二：邀请其他好友
</div>
<div>
通过QQ、MSN、电子邮件发送邀请链接给你的朋友:<br />
<input type="text" id="invite_url_link" style="width:400px;border:1px solid #b2b2b2" value="<?=$url?>" /> <input type="button" style="border:1px solid #b2b2b2" onclick="copy($('invite_url_link'))" value="复制链接" />

</div>
<?php } ?>

</div>
<div class="iv_list" >
<div style="padding-left:120px;line-height:32px;" class="iv_title">
成功邀请<?=count($list)?>位好友,已获得<?=intval(count($list)/5)?>枚金币
</div>
<div class="iv_list_p">
<?php  foreach ($list as $li) { 
    ?>

    <div class="iv_pp">
        <div class="l">
        <img src="<?=$li['g_head']?>" />
        </div>
        <div class="r">
        <?=$li['g_name']?>
        </div>
    
    </div>
<?php } ?>    
</div>
</div>